s = "Hello World"
if s == '':
    print(1)
l = 0
for i in range(len(s), -1, -1):
    if s[i] != ' ':
        l += 1
    elif s[i] == ' ' and l != 0:
        print(1)